<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<div id=PageSelectorBar>
    <div id=PageSelectorMemo>
        页次：${currentPage}/${pageCount}页 &nbsp;
        每页显示：<input type="text" name="pageSize"value="${pageSize}">条 &nbsp;
        总记录数：${recordCount}条
    </div>
    <div id=PageSelectorSelectorArea>
        <!--
				<IMG SRC="${pageContext.request.contextPath}/OfficeAuto/style/blue/images/pageSelector/firstPage2.png"/>
				-->
        <a href="javascript:void(0)" onclick="gotoPageNum(1)" title="首页" style="cursor: hand;">
            <img src="${pageContext.request.contextPath}/OfficeAuto/style/blue/images/pageSelector/firstPage.png"/>
        </a>
        <%--迭代便利出页码--%>
        <struts:iterator begin="behinPageIndex" end="endPageIndex" var="s">
            <%--判断是否为当前页--%>
            <struts:if test="currentPage==#s">
        <span class="PageSelectorNum PageSelectorSelected">
							<struts:property value="#s"/>
						</span>
            </struts:if>
            <struts:else>
        <span class="PageSelectorNum" style="cursor: hand;"
              onclick='gotoPageNum(<struts:property value="#s"/>);'>
							<struts:property value="#s"/>
						</span>
                <span/>
            </struts:else>
        </struts:iterator>
        <!--
				<IMG SRC="${pageContext.request.contextPath}/OfficeAuto/style/blue/images/pageSelector/lastPage2.png"/>
				-->
        <a href="#" onclick="gotoPageNum(${pageCount})" title="尾页" style="cursor: hand;">
            <img src="${pageContext.request.contextPath}/OfficeAuto/style/blue/images/pageSelector/lastPage.png"/>
        </a>
        转到：
        <select onchange="gotoPageNum(this.value)">
            <struts:iterator begin="1" end="endPageIndex" var="s">
                <option value="<struts:property value="#s"/> "><struts:property value="#s"/></option>
            </struts:iterator>
        </select>
    </div>
</div>
<%--利用javaScript提交form表单--%>
<script language="JavaScript">
    function gotoPageNum(pageNum) {
        $("#pageForm").append('<input type="hidden" name="currentPage" value="'+pageNum+'" id="currentPage">');
        $("#pageForm").submit();
    }
</script>

